
package com.zsrt.day20170506.socket;

import java.io.OutputStream;
import java.io.PrintStream;
import java.net.Socket;

/**
 * 客户端
 * @author jmj
 * @date 2017年5月6日
 * @time 下午4:22:12
 */
public class Client {

	public static void main(String[] args) throws Exception{
		
		Socket socket = new Socket("192.168.3.96", 8888);
		
		//得到字符流
		OutputStream os = socket.getOutputStream();
		
		//输出字符流
		PrintStream pStream= new PrintStream(os,true);
		
		pStream.println("hello jiamengju");
		
		os.close();
	}
}
